import { IFeidaoAiBrowserComponent, IFeidaoAiNodejsComponent } from '@feidao/web/interfaces';

export default function tpl(fd: IFeidaoAiBrowserComponent | IFeidaoAiNodejsComponent | any) {
	return `
	<div style="padding-left:10px;">
		<span style="margin:  20px;font-size: 20px;">开发常见错误</span>
		<table style="margin-top:  10px;width:  100%;">
		<thead style="background: #f4f4f4;height: 40px;margin-top: 10px;line-height:  40px;border: 1px solid #ddd;">
			<tr>
				<td style="width:  50px;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">序号</td>
				<td style="width:  100px;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">错误说明</td>
				<td style="width:  300px;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">错误截图</td>
				<td style="width:  300px;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">解决方法</td>
			</tr>
		</thead>
		<tbody>
			<tr style="height: 40px;line-height:  40px;">
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">1</td>
				<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">使用whoami原子操作获取用户信息，切换用户后获取的用户信息不变</td>
				<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='' width=300 data-feidao-actions="click:eu-001"></td>
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  left;border-right: 1px solid #ddd;">关闭当前页签或者浏览器重新登录即可（为了减少开发服务请求使用了缓存sessionStorage）</td>
			</tr>
			<tr style="height: 40px;line-height:  40px;">
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">2</td>
				<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">下载excel使用第三方库exceljs，服务配置</td>
				<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='' width=300 data-feidao-actions="click:eu-001"></td>
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  left;border-right: 1px solid #ddd;">
					在文件feidao-server.json中添加router路由，URL的值为访问地址，modelid的值为"custom::js_***"，***为服务的具体路径
				</td>
			</tr>
			<tr style="height: 40px;line-height:  40px;">
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">3</td>
				<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">报错</td>
				<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/dev/1.jpeg' width=300 data-feidao-actions="click:eu-001"></td>
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  left;border-right: 1px solid #ddd;">
					将依赖包删除再下载最新依赖包
				</td>
			</tr>
			<tr style="height: 40px;line-height:  40px;">
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">4</td>
				<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">本地服务文件删除之后还能继续访问取数</td>
				<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='' width=300 data-feidao-actions="click:eu-001"></td>
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  left;border-right: 1px solid #ddd;">查看./service/dist目录下找到对应的服务js文件进行删除即可</td>
			</tr>
			<tr style="height: 40px;line-height:  40px;">
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">5</td>
				<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">参数类型错误，多出现分页</td>
				<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/dev/2.jpg' width=300 data-feidao-actions="click:eu-001"></td>
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  left;border-right: 1px solid #ddd;">传入的参数应该为数字而不是字符串</td>
			</tr>
			<tr style="height: 40px;line-height:  40px;">
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">6</td>
				<td style="width:  100px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;">导出文件报错</td>
				<td style="width:  300px;cursor: pointer;vertical-align:  top;text-align:  center;border-right: 1px solid #ddd;"><img inline src='./images/dev/3.png' width=300 data-feidao-actions="click:eu-001"></td>
				<td style="width:  50px;cursor: pointer;vertical-align:  top;text-align:  left;border-right: 1px solid #ddd;">更新本机nodejs版本</td>
			</tr>
		</tbody>
	</table>
	<fd-wh000013 id='widget' header-bgc='coral' title='截图' style="width: 100%;height: 100%;display: block;top: 0px;" data-feidao-actions="fdwe-cancel:eu-002">
		<div slot='content'>
			<img src='' data-feidao-id='show-img' style="max-width: 100%;max-height: 100%;">
		</div>
		<div slot='footer'>
    	</div>
	</fd-wh000013>
	</div>
	`;
}